#include <iostream>
/* Declarations of functions implementing operations bis and bic */
// bit set by bit
// bis([1100],[0011])=[1111]
int bis(int x,int m){
    // int mask=1<<m;
    // return x&mask;
    return x|m;
}
// bit clear by bit
// bic([1100],[0011])=[1100]
int bic(int x,int m){
    return x&(~m);
}

/* Compute x|y using only calls to functions bis and bic */
int bool_or(int x,int y){ // 1100 or 0011 = 1111
    return bis(x,y);
}

/* Compute x^y using only calls to functions bis and bic */
// x^y = (x&~y)|(~x&y)
int bool_xor(int x,int y){
    return bis(bic(x,y),bic(y,x));
}
